function throttle(fn, interval) {
    let last;
    let timer;
    return function() {
        const _this = this;
        const args = arguments;
        let now = new Date();
        if (last && now - last < interval) {
            clearTimeout(timer);
            timer = setTimeout(function () {
				last = now;
				fn.apply(th, args);
			}, interval);
        } else {
            last = now;
			fn.apply(th, args);
        }
    }
}

